﻿using System;
using System.Data;
using System.Data.Common;
using Liger.Common;
using Liger.Data;

namespace EasyFMS.Model
{

	/// <summary>
	/// 实体类cCheckApply
	/// </summary>
	[Serializable]
	public class cCheckApply : Entity 
	{ 
		 public cCheckApply() 
            : base("cCheckApply") 
        { 

        }


		#region Model
		private int _UID;
		private string _CheckApplyNo;
		private int? _CheckApplyStatus;
		private string _CheckApplyDate;
		private string _DeptCode;
		private int? _QTY;
		private bool? _IsCommit;
		private string _CommitDate;
		private int? _UserCommitID;
		private bool? _IsAllocate;
		private string _AllocateDate;
		private int? _UserAllocateID;
		private bool? _IsConfirm;
		private int? _UserConfirmID;
		private string _ConfirmDate;
		private string _Note;
		private bool? _IsSelect;
		private int? _UserCreateID;
		private string _CreateDate;
		private int? _UserModifyID;
		private string _ModifyDate;
	 
		/// <summary>
		/// 
		/// </summary>
		public int UID
		{
			get{ return _UID; }
			set
			{
				this.OnPropertyValueChange(_.UID,_UID,value);
				this._UID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CheckApplyNo
		{
			get{ return _CheckApplyNo; }
			set
			{
				this.OnPropertyValueChange(_.CheckApplyNo,_CheckApplyNo,value);
				this._CheckApplyNo = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? CheckApplyStatus
		{
			get{ return _CheckApplyStatus; }
			set
			{
				this.OnPropertyValueChange(_.CheckApplyStatus,_CheckApplyStatus,value);
				this._CheckApplyStatus = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CheckApplyDate
		{
			get{ return _CheckApplyDate; }
			set
			{
				this.OnPropertyValueChange(_.CheckApplyDate,_CheckApplyDate,value);
				this._CheckApplyDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string DeptCode
		{
			get{ return _DeptCode; }
			set
			{
				this.OnPropertyValueChange(_.DeptCode,_DeptCode,value);
				this._DeptCode = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? QTY
		{
			get{ return _QTY; }
			set
			{
				this.OnPropertyValueChange(_.QTY,_QTY,value);
				this._QTY = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsCommit
		{
			get{ return _IsCommit; }
			set
			{
				this.OnPropertyValueChange(_.IsCommit,_IsCommit,value);
				this._IsCommit = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CommitDate
		{
			get{ return _CommitDate; }
			set
			{
				this.OnPropertyValueChange(_.CommitDate,_CommitDate,value);
				this._CommitDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserCommitID
		{
			get{ return _UserCommitID; }
			set
			{
				this.OnPropertyValueChange(_.UserCommitID,_UserCommitID,value);
				this._UserCommitID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsAllocate
		{
			get{ return _IsAllocate; }
			set
			{
				this.OnPropertyValueChange(_.IsAllocate,_IsAllocate,value);
				this._IsAllocate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string AllocateDate
		{
			get{ return _AllocateDate; }
			set
			{
				this.OnPropertyValueChange(_.AllocateDate,_AllocateDate,value);
				this._AllocateDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserAllocateID
		{
			get{ return _UserAllocateID; }
			set
			{
				this.OnPropertyValueChange(_.UserAllocateID,_UserAllocateID,value);
				this._UserAllocateID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsConfirm
		{
			get{ return _IsConfirm; }
			set
			{
				this.OnPropertyValueChange(_.IsConfirm,_IsConfirm,value);
				this._IsConfirm = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserConfirmID
		{
			get{ return _UserConfirmID; }
			set
			{
				this.OnPropertyValueChange(_.UserConfirmID,_UserConfirmID,value);
				this._UserConfirmID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ConfirmDate
		{
			get{ return _ConfirmDate; }
			set
			{
				this.OnPropertyValueChange(_.ConfirmDate,_ConfirmDate,value);
				this._ConfirmDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Note
		{
			get{ return _Note; }
			set
			{
				this.OnPropertyValueChange(_.Note,_Note,value);
				this._Note = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsSelect
		{
			get{ return _IsSelect; }
			set
			{
				this.OnPropertyValueChange(_.IsSelect,_IsSelect,value);
				this._IsSelect = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserCreateID
		{
			get{ return _UserCreateID; }
			set
			{
				this.OnPropertyValueChange(_.UserCreateID,_UserCreateID,value);
				this._UserCreateID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CreateDate
		{
			get{ return _CreateDate; }
			set
			{
				this.OnPropertyValueChange(_.CreateDate,_CreateDate,value);
				this._CreateDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserModifyID
		{
			get{ return _UserModifyID; }
			set
			{
				this.OnPropertyValueChange(_.UserModifyID,_UserModifyID,value);
				this._UserModifyID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModifyDate
		{
			get{ return _ModifyDate; }
			set
			{
				this.OnPropertyValueChange(_.ModifyDate,_ModifyDate,value);
				this._ModifyDate = value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取实体中的标识列
		/// </summary>
		public override Field GetIdentityField()
		{
			return _.UID;
		}
		/// <summary>
		/// 获取实体中的主键列
		/// </summary>
		public override Field[] GetPrimaryKeyFields()
		{
			return new Field[] {
				_.UID			};
		}
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.UID,
				_.CheckApplyNo,
				_.CheckApplyStatus,
				_.CheckApplyDate,
				_.DeptCode,
				_.QTY,
				_.IsCommit,
				_.CommitDate,
				_.UserCommitID,
				_.IsAllocate,
				_.AllocateDate,
				_.UserAllocateID,
				_.IsConfirm,
				_.UserConfirmID,
				_.ConfirmDate,
				_.Note,
				_.IsSelect,
				_.UserCreateID,
				_.CreateDate,
				_.UserModifyID,
				_.ModifyDate
			};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				_UID,
				_CheckApplyNo,
				_CheckApplyStatus,
				_CheckApplyDate,
				_DeptCode,
				_QTY,
				_IsCommit,
				_CommitDate,
				_UserCommitID,
				_IsAllocate,
				_AllocateDate,
				_UserAllocateID,
				_IsConfirm,
				_UserConfirmID,
				_ConfirmDate,
				_Note,
				_IsSelect,
				_UserCreateID,
				_CreateDate,
				_UserModifyID,
				_ModifyDate
			};
		} 
		/// <summary>
		/// 设置字段值
		/// </summary>
		public override void SetValue(string fieldName, object value)
        {
            switch (fieldName)
            { 
				case "UID":
                    this._UID = DataHelper.ConvertValue<int>(value);
                    break; 
				case "CheckApplyNo":
                    this._CheckApplyNo = DataHelper.ConvertValue<string>(value);
                    break; 
				case "CheckApplyStatus":
                    this._CheckApplyStatus = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "CheckApplyDate":
                    this._CheckApplyDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "DeptCode":
                    this._DeptCode = DataHelper.ConvertValue<string>(value);
                    break; 
				case "QTY":
                    this._QTY = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "IsCommit":
                    this._IsCommit = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "CommitDate":
                    this._CommitDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserCommitID":
                    this._UserCommitID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "IsAllocate":
                    this._IsAllocate = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "AllocateDate":
                    this._AllocateDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserAllocateID":
                    this._UserAllocateID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "IsConfirm":
                    this._IsConfirm = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "UserConfirmID":
                    this._UserConfirmID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "ConfirmDate":
                    this._ConfirmDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Note":
                    this._Note = DataHelper.ConvertValue<string>(value);
                    break; 
				case "IsSelect":
                    this._IsSelect = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "UserCreateID":
                    this._UserCreateID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "CreateDate":
                    this._CreateDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserModifyID":
                    this._UserModifyID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "ModifyDate":
                    this._ModifyDate = DataHelper.ConvertValue<string>(value);
                    break; 
            }
        }
		/// <summary>
		/// 获取字段值
		/// </summary>
        public override object GetValue(string fieldName)
        {
            switch (fieldName)
            { 
				case "UID":
                    return this._UID; 
				case "CheckApplyNo":
                    return this._CheckApplyNo; 
				case "CheckApplyStatus":
                    return this._CheckApplyStatus; 
				case "CheckApplyDate":
                    return this._CheckApplyDate; 
				case "DeptCode":
                    return this._DeptCode; 
				case "QTY":
                    return this._QTY; 
				case "IsCommit":
                    return this._IsCommit; 
				case "CommitDate":
                    return this._CommitDate; 
				case "UserCommitID":
                    return this._UserCommitID; 
				case "IsAllocate":
                    return this._IsAllocate; 
				case "AllocateDate":
                    return this._AllocateDate; 
				case "UserAllocateID":
                    return this._UserAllocateID; 
				case "IsConfirm":
                    return this._IsConfirm; 
				case "UserConfirmID":
                    return this._UserConfirmID; 
				case "ConfirmDate":
                    return this._ConfirmDate; 
				case "Note":
                    return this._Note; 
				case "IsSelect":
                    return this._IsSelect; 
				case "UserCreateID":
                    return this._UserCreateID; 
				case "CreateDate":
                    return this._CreateDate; 
				case "UserModifyID":
                    return this._UserModifyID; 
				case "ModifyDate":
                    return this._ModifyDate; 
				default :
                    return null;
            } 
        }



		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","cCheckApply");
 
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UID = new Field("UID","cCheckApply","UID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CheckApplyNo = new Field("CheckApplyNo","cCheckApply","CheckApplyNo");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CheckApplyStatus = new Field("CheckApplyStatus","cCheckApply","CheckApplyStatus");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CheckApplyDate = new Field("CheckApplyDate","cCheckApply","CheckApplyDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field DeptCode = new Field("DeptCode","cCheckApply","DeptCode");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field QTY = new Field("QTY","cCheckApply","QTY");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsCommit = new Field("IsCommit","cCheckApply","IsCommit");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CommitDate = new Field("CommitDate","cCheckApply","CommitDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCommitID = new Field("UserCommitID","cCheckApply","UserCommitID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsAllocate = new Field("IsAllocate","cCheckApply","IsAllocate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field AllocateDate = new Field("AllocateDate","cCheckApply","AllocateDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserAllocateID = new Field("UserAllocateID","cCheckApply","UserAllocateID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsConfirm = new Field("IsConfirm","cCheckApply","IsConfirm");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserConfirmID = new Field("UserConfirmID","cCheckApply","UserConfirmID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ConfirmDate = new Field("ConfirmDate","cCheckApply","ConfirmDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Note = new Field("Note","cCheckApply","Note");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsSelect = new Field("IsSelect","cCheckApply","IsSelect");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCreateID = new Field("UserCreateID","cCheckApply","UserCreateID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CreateDate = new Field("CreateDate","cCheckApply","CreateDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserModifyID = new Field("UserModifyID","cCheckApply","UserModifyID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModifyDate = new Field("ModifyDate","cCheckApply","ModifyDate");
		}
		#endregion

 
	}
}

